/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package grayscale;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;

/**
 *
 * @author WIN7
 */
public class MainFrame extends JFrame implements KeyListener{

    private MainPanel main_panel;
    public MainFrame(){
        
    }
    public void Initialize(){        
        addKeyListener(this);
        setBounds(400, 20, 660, 600);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        main_panel = new MainPanel();
        main_panel.Initialize();
        setContentPane(main_panel);
    }

    public void keyTyped(KeyEvent e) {

    }

    public void keyPressed(KeyEvent e) {
        if(e.getKeyCode() == KeyEvent.VK_ESCAPE)
            System.exit(0);
    }

    public void keyReleased(KeyEvent e) {

    }
}
